import {RouterModule} from "@angular/router";
import {userActiveInter} from "../intercept/route/userActiveInter";

import {UserDetailComponent} from "./user-detail/user-detail.component";
import {UserLoginComponent} from "./user-login/user-login.component";
import {UserComponent} from "./user.component";
import {UserRegistComponent} from "./user-regist/user-regist.component";
import {UserCollectionComponent} from "./user-collection/user-collection.component";
import {UserForgetpasswordComponent} from "./user-forgetpassword/user-forgetpassword.component";

export const userRoutesConfig=[
    {
		path:'user',
		children:[
			{ path: '', 	redirectTo:'login',pathMatch:'full'},
	    	{ path: 'detail', component:UserDetailComponent , canActivate:[userActiveInter] },
			{ path: 'login',	component:UserLoginComponent},
			{ path: 'collection', 	component:UserCollectionComponent,canActivate:[userActiveInter] },
			{ path: 'regist', 	component:UserRegistComponent},
			{ path: 'forgetpassword',	component:UserForgetpasswordComponent,canActivate:[userActiveInter] },
			{ path: '**', 	redirectTo:'/login',pathMatch:'full'}
	    ]
	}
]